﻿#include "DBConf.h"

DBConf::DBConf(void)
{
	m_ip = "127.0.0.1";
	m_port = 3306;
	m_db_name = "box3";
	m_user = "root";
	m_password = "root";
	// 0:mysql 1:sqlite
	m_db_type = 1;
}

DBConf::~DBConf(void)
{
}

int DBConf::GetDbType()
{
	return m_db_type;
}

void DBConf::SetDbType(int type)
{
	m_db_type = type;
}

std::string DBConf::GetIp()
{
	return m_ip;
}

void DBConf::SetIp(std::string ip)
{
	m_ip = ip;
}

int DBConf::GetPort()
{
	return m_port;
}

void DBConf::SetPort(int port)
{
	m_port = port;
}

std::string DBConf::GetUser()
{
	return m_user;
}

void DBConf::SetUser(std::string user)
{
	m_user = user;
}

std::string DBConf::GetPassword()
{
	return m_password;
}

void DBConf::SetPassword(std::string pwd)
{
	m_password = pwd;
}

std::string DBConf::GetDbName()
{
	return m_db_name;
}

void DBConf::SetDbName(std::string dbName)
{
	m_db_name = dbName;
}